<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
      <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
	<!-- Bootstrap Styles-->
    <link href="assets/css/bootstrap.css" rel="stylesheet" />
     <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet" />
     <!-- Morris Chart Styles-->
   
        <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet" />
     <!-- Google Fonts-->
   <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
     <!-- TABLE STYLES-->
    <link href="assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" ><i class="fa fa-gear"></i> <strong>学生成绩管理系统</strong></a>
            </div>

            <ul class="nav navbar-top-links navbar-right">
 

                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a onclick=logout() style="cursor:pointer"><i class="fa fa-sign-out fa-fw"></i> 退出登录</a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
        </nav>
        <!--/. NAV TOP  -->
        <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
                    <li><a id = "student_info" onclick=student_info() style="cursor:pointer" ><i class="fa fa-table"></i>查看所有学生信息</a></li>
                    <li><a id = "add_student" onclick=add_student() style="cursor:pointer" ><i class="fa fa-edit"></i>添加学生</a></li>
                    <li><a id= "teacher_info" onclick=teacher_info() style="cursor:pointer"><i class="fa fa-table"></i>查看所有教师信息</a></li>
                    <li><a id = "add_teacher" onclick=add_teacher() style="cursor:pointer"><i class="fa fa-edit"></i>添加教师</a></li>
                    <li><a id = "course_info" onclick=course_info() style="cursor:pointer"><i class="fa fa-table"></i>查看所有课程信息</a></li>
                    <li><a id ="add_course" onclick=add_course() style="cursor:pointer"><i class="fa fa-edit"></i>添加课程</a></li>
                    <li><a id = "major_info" onclick=major_info() style="cursor:pointer"><i class="fa fa-table"></i>查看所有专业信息</a></li>
                    <li><a id ="add_major" onclick=add_major() style="cursor:pointer"><i class="fa fa-edit"></i>添加专业</a></li>
                    <li><a id ="major_course_info" onclick=major_course_info() style="cursor:pointer"><i class="fa fa-table"></i>查看专业选课信息</a></li>
                    <li><a id ="add_major_course" onclick=add_major_course() style="cursor:pointer"><i class="fa fa-edit"></i>添加专业选课</a></li>
                </ul>
            </div>
        </nav>
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper" >
            <div id="page-inner">
			 <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                            	 <strong id = "welcome">欢迎来到管理员界面</strong>
                        </h1>
                    </div>
                </div> 
                 <!-- /. ROW  -->
               
            <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                      <!--  <div class="panel-heading">
                             Advanced Tables
                        </div>-->
                        <div class="panel-body">
                            <div class="table-responsive" id = "tablecontainer">
         
                            </div>
                            
                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>

        </div>
    </div>
             <!-- /. PAGE INNER  -->
            </div>
         <!-- /. PAGE WRAPPER  -->
     <!-- /. WRAPPER  -->
    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="assets/js/jquery-1.10.2.js"></script>
      <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
     <!-- DATA TABLE SCRIPTS -->
    <script src="assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
        <script>
            $(document).ready(function () {
                $('#dataTables-example').dataTable();
            });
    </script>
         <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>
    <script src="js/admin_process_info_list.js">//具体处理显示信息列表</script>

    <script type="text/javascript">
        // 跳转页面

        function logout(){
            if (confirm("您确定退出吗？")) {  
                window.location.href = "Login.html";
            }             
        }
        function student_info() {
            localStorage.setItem("current_type", "student_info");
            window.location.href="Admin_Info.html";
        }
        function teacher_info() {
            localStorage.setItem("current_type", "teacher_info");
            window.location.href="Admin_Info.html";
        }
        function course_info() {
            localStorage.setItem("current_type", "course_info");
            window.location.href="Admin_Info.html";
        }
        function major_info() {
            localStorage.setItem("current_type", "major_info");
            window.location.href="Admin_Info.html";
        }
        function major_course_info() {
            localStorage.setItem("current_type", "major_course_info");
            window.location.href="Admin_Info.html";
        }
        
        function add_student() {
            localStorage.setItem("current_type", "add_student");
            window.location.href="Admin_Detail.html";
        }
        function add_teacher() {
            localStorage.setItem("current_type", "add_teacher");
            window.location.href="Admin_Detail.html";
        }
        function add_course() {
            localStorage.setItem("current_type", "add_course");
            window.location.href="Admin_Detail.html";
        }
        function add_major() {
            localStorage.setItem("current_type", "add_major");
            window.location.href="Admin_Detail.html";
        }
        function add_major_course() {
            localStorage.setItem("current_type", "add_major_course");
            window.location.href="Admin_Detail.html";
        }
    </script>
    <script type="text/javascript">
        // 显示当前页面
        var current_type = localStorage.getItem("current_type");
        if (current_type == "student_info") {
            var info = document.getElementById("welcome");
            info.innerHTML = "学生信息列表";
            var ele = document.getElementById("student_info");
            ele.style = "";
            ele.onclick = null;
            ele.className = "active-menu";
            process_student_info();
        } else if (current_type == "teacher_info") {
            var info = document.getElementById("welcome");
            info.innerHTML = "教师信息列表";
            var ele = document.getElementById("teacher_info");
            ele.style = "";
            ele.onclick = null;
            ele.className = "active-menu";
            process_teacher_info();
        } else if (current_type == "course_info") {
            var info = document.getElementById("welcome");
            info.innerHTML = "课程信息列表";
            var ele = document.getElementById("course_info");
            ele.style = "";
            ele.onclick = null;
            ele.className = "active-menu";
            process_course_info();
        } else if (current_type == "major_info") {
            var info = document.getElementById("welcome");
            info.innerHTML = "专业信息列表";
            var ele = document.getElementById("major_info");
            ele.style = "";
            ele.onclick = null;
            ele.className = "active-menu";
            process_major_info();
        } else if (current_type == "major_course_info") {
            var info = document.getElementById("welcome");
            info.innerHTML = "专业选课信息列表";
            var ele = document.getElementById("major_course_info");
            ele.style = "";
            ele.onclick = null;
            ele.className = "active-menu";
            process_major_course_info();
        } else {
            alert("current_type illegal: " + current_type);
        }
    </script>
</body>
</html>


